Skip to content

feat(internal/librariangen): implement the configure container command#13214

Closed
jskeet wants to merge 3 commits intomainfrom
implement-configure
Closed

feat(internal/librariangen): implement the configure container command#13214
jskeet wants to merge 3 commits intomainfrom
implement-configure

Conversation

@jskeet
Copy link
Copy Markdown
Contributor

@jskeet jskeet commented Oct 23, 2025

This was used to create #13213.

This is completely lacking in tests, which should be provided before
merging.

The implementation will currently require a playbook along the lines of:

1. Run `librarian generate -api=google/cloud/abc/v1 -library=abc`
1. Run `(cd abc && go mod tidy)`
1. Run `go work use ./abc`
1. Commit changes and push

Steps 2 and 3 are only needed for whole new libraries (as opposed to
new APIs within existing libraries)

It would be nice to be able to get rid of steps 2 and 3 entirely, but
they're difficult.

We can't run `go mod tidy` without source code,
which either means running the generator during configure (which is
ugly and somewhat against the spirit of configure) or do so in
`generate`, but *only* on the very first run.

We can't run `go work use` without copying *all* of the `go.mod` files
referenced in there into the output directory (and then removing
them again). We could modify `go.work` directly, but that's ugly too.

These can be addressed in the longer term as we attempt to get to
fully automated onboarding, but having the steps in the playbook
introduces *relatively* little toil, while saving a *lot* of work in the
container.
@jskeet jskeet requested a review from quartzmo October 23, 2025 09:14
@quartzmo quartzmo changed the title feat: implement the configure container command feat(internal/librariangen): implement the configure container command Oct 23, 2025
@quartzmo
Copy link
Copy Markdown
Member

Replaced by #13221.

@quartzmo quartzmo closed this Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants